package com.bdqn.mapper;

import com.bdqn.entity.OuProjectOrder;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface OuProjectOrderMapper {
    @Select({
        "select",
        "ORDER_ID, SERIAL_NUMBER, TITLE, SUBTITLE, URGENT_M, ORDER_CATEGORY, STATUS, ",
        "MANAGER_ID, CREATE_DATE, CREATE_USER_ID, PLAN_BEGIN_DATE, PLAN_END_DATE, END_DATE, ",
        "DELETE_M",
        "from OU_PROJECT_ORDER",
        "where ORDER_ID = #{orderId,jdbcType=VARCHAR}"
    })
    @ResultMap("BaseResultMap")
    OuProjectOrder selectByPrimaryKey(String orderId);

    @Insert({
        "insert into OU_PROJECT_ORDER (ORDER_ID, SERIAL_NUMBER, ",
        "TITLE, SUBTITLE, ",
        "URGENT_M, ORDER_CATEGORY, ",
        "STATUS, MANAGER_ID, ",
        "CREATE_DATE, CREATE_USER_ID, ",
        "PLAN_BEGIN_DATE, PLAN_END_DATE, ",
        "END_DATE, DELETE_M)",
        "values (#{orderId,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR}, ",
        "#{title,jdbcType=VARCHAR}, #{subtitle,jdbcType=VARCHAR}, ",
        "#{urgentM,jdbcType=DECIMAL}, #{orderCategory,jdbcType=DECIMAL}, ",
        "#{status,jdbcType=DECIMAL}, #{managerId,jdbcType=VARCHAR}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=VARCHAR}, ",
        "#{planBeginDate,jdbcType=TIMESTAMP}, #{planEndDate,jdbcType=TIMESTAMP}, ",
        "#{endDate,jdbcType=TIMESTAMP}, #{deleteM,jdbcType=DECIMAL})"
    })
    int insert(OuProjectOrder record);

    int insertSelective(OuProjectOrder record);

    int updateByPrimaryKeySelective(OuProjectOrder record);

    @Delete({
        "delete from OU_PROJECT_ORDER",
        "where ORDER_ID = #{orderId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String orderId);

    Object dynamicSQL(String value);

    List dynamicSQLReturnList(String value);

    int dynamicSqlReturnInt(String value);
}